home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
WebSites
/
Sites
/
Wirenet
/
files
/
AutoNotify.lha
/
AutoNotify.br
next >
Wrap
Text File
|
1999-04-04
|
2KB
|
52 lines
/*
$VER: AutoNotify.br 1.0 (3.4.99)
by Neil Bothwick
*/
/* ;;; History
Freezes an event before starting the editor, to prevent
unedited mails being sent out
1.0 The first, and hopefully last, version
;;; */
/* ;;; Initialise */
options results
parse arg SystemName
if ~show('p', 'BBSREAD') then do
address command
'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
'WaitForPort BBSREAD'
end
if ~show('L','rexxdossupport.library') then do
if ~addlib('rexxdossupport.library',0,-30,0) then call ExitMsg('Failed to open rexxdossupport.library')
end
ThorDir = GetVar('THOR/THORPath')
NotifyDir = ThorDir||'autonotify/'
;;;
/* ;;; Traverse event list */
address BBSREAD
drop SYSTEMDATA.
'GETBBSDATA "'SystemName'" SYSTEMDATA'
do EventNo = SystemData.FIRSTEVENT to SystemData.LASTEVENT
drop EventTags.
READBREVENT '"'SystemName'"' eventnr EventNo tagsstem EventTags
if exists(NotifyDir||EventTags.TOADDR) then call CreateNotify()
end
exit
;;;
/* ;;; Create notify event */
CreateNotify:
comment = subword(statef(NotifyDir||EventTags.TOADDR),8)
parse var comment NotifyAddr'|'Subject
address command ThorDir'rexx/SendMail.br "'SystemName'" EMail' NotifyAddr 'subject "'Subject'" text "'NotifyDir||EventTags.TOADDR'"'
if RC > 0 then call ExitMsg('Failed to created notification for event' EventNo)
return
;;;
/* ;;; Exit with a message */
ExitMsg:
parse arg msg
/*address command 'RequestChoice >NIL: "AutoNotify.br" "'msg'" "Continue"'*/
say msg
exit
;;;